{% extends 'base_two.html' %}
{% load order_filter %}
{% load static %}
{% block content %}
			<div class="pull-right">
				<div class="user-content__box clearfix bgf">
					<div class="title">订单中心-我的订单</div>
					<div class="order-list__box bgf">
						<div class="order-panel">
							<ul class="nav user-nav__title" role="tablist">
								<li role="presentation" class="nav-item active"><a href="#all" aria-controls="all" role="tab" data-toggle="tab">所有订单</a></li>
								<li role="presentation" class="nav-item "><a href="#pay" aria-controls="pay" role="tab" data-toggle="tab">待付款 <span class="cr">{{ unpaid_num }}</span></a></li>
								<li role="presentation" class="nav-item "><a href="#emit" aria-controls="emit" role="tab" data-toggle="tab">待发货 <span class="cr">{{ unshipment_num }}</span></a></li>
								<li role="presentation" class="nav-item "><a href="#take" aria-controls="take" role="tab" data-toggle="tab">待收货 <span class="cr">{{ unreceiving_num }}</span></a></li>
								<li role="presentation" class="nav-item "><a href="#eval" aria-controls="eval" role="tab" data-toggle="tab">待评价 <span class="cr">{{ unevaluate_num }}</span></a></li>
							</ul>

							<div class="tab-content">
                            {# 所有的 #}
{#                            {%for item in page%}#}
								<div role="tabpanel" class="tab-pane fade in active" id="all">
									<table class="table text-center">
										<tr>
											<th width="380">商品信息</th>
											<th width="85">单价</th>
											<th width="85">数量</th>
											<th width="120">实付款</th>
											<th width="120">交易状态</th>
											<th width="120">交易操作</th>
										</tr>
                                        {% if unpaid_orders %}
                                            {% for unpaid_order in unpaid_orders %}
                                                {% for order,good_info in unpaid_order.items %}
                                                    <tr class="order-item">
                                                    <td>
                                                        <label>
                                                            <a href="udai_order_detail.html" class="num">
                                                                {{ order.create_time | filter_time }} 订单号: 2669901385864042
                                                            </a>
                                                            {% for name,info in good_info.items %}
                                                                <div class="card">
                                                                <div class="img"><img src="{% static 'images/temp/item-img_1.jpg' %}" alt="" class="cover"></div>
                                                                <div class="name ep2">{{ name }}</div>
                                                                <div class="format">颜色分类：{{ info.goods_info_color }}  尺码：{{ info.goods_info_size }}</div>
                                                                <div class="favour">使用优惠券：优惠¥2.00</div>
                                                            </div>
                                                        </label>
                                                    </td>
                                                    <td>￥{{ info.goods_info_price }}</td>
                                                    <td>{{ order.goods_number }}</td>
                                                    <td>￥{{ order.payable_amount }}<br><span class="fz12 c6 text-nowrap">(含运费: ¥0.00)</span></td>
                                                    <td class="state">
                                                        <a class="but c6">等待付款</a>
                                                        <a href="udai_mail_query.html" class="but cr">确认信息</a>
                                                        <a href="udai_order_detail.html" class="but c9">订单详情</a>
                                                    </td>
                                                    <td class="order">
                                                        <div class="del"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span></div>
                                                        <a href="{% url 'order_from:pay_page' id=order.order_id%}" class="but but-link">付款</a>
                                                        <a href="{% url 'order_from:delete_order' id=order.order_id%}" class="but c3">取消订单</a>
                                                    </td>
                                                </tr>
                                                                {% endfor %}
                                                    {% endfor %}
                                            {% endfor %}
                                        {% else %}
                                            <tr class="order-empty"><td colspan='6'>
											    <div class="empty-msg">最近没有任何订单，家里好像缺了点什么！<br><a href="item_category.html">要不瞧瞧去？</a></div>
										        </td>
                                            </tr>
                                        {% endif %}
                                        {% if unshipment_orders %}
                                            {% for unshipment_order in unshipment_orders %}
                                                {% for order,good_info in unshipment_order.items %}
                                            <tr class="order-item">
                                                <td>
                                                    <label>
                                                        <a href="udai_order_detail.html" class="num">
                                                            {{ order.create_time | filter_time }} 订单号: 2669901385864042
                                                        </a>
                                                        {% for good,info in good_info.items %}

                                                        <div class="card">
                                                            <div class="img"><img src="{% static 'images/temp/item-img_1.jpg' %}" alt="" class="cover"></div>
                                                            <div class="name ep2">{{ good }}</div>
                                                            <div class="format">颜色分类：{{ info.goods_info_color }}  尺码：{{ info.goods_info_size }}</div>
                                                            <div class="favour">使用优惠券：优惠¥2.00</div>
                                                        </div>
                                                    </label>
                                                </td>
                                                <td>{{ info.goods_info_price}}</td>
                                                <td>{{ order.goods_number}}</td>
                                                <td>{{ order.payable_amout }}<br><span class="fz12 c6 text-nowrap">(含运费: ¥0.00)</span></td>
                                                <td class="state">
                                                    <a class="but c6">等待发货</a>
                                                    <a href="udai_order_detail.html" class="but c9">订单详情</a>
                                                </td>
                                                <td class="order">
                                                    <div class="del"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span></div>
                                                    <a href="{% url 'order_from:order_receipted' id=order.order_id %}" class="but but-primary">确认收货</a>
                                                    <a href="{% url 'order_from:order_apply_return' id=order.order_id%}" class="but c3">退款/退货</a>
                                                </td>
                                            </tr>
                                                            {% endfor %}
                                                    {% endfor %}
                                            {% endfor %}
                                            {% else %}
                                            <tr class="order-empty"><td colspan='6'>
											    <div class="empty-msg">最近没有任何订单，家里好像缺了点什么！<br><a href="item_category.html">要不瞧瞧去？</a></div>
										        </td>
                                            </tr>
                                        {% endif %}
                                        {% if unreceiving_orders %}
                                            {% for unreceiving_order in unreceiving_orders %}
                                                {% for order,good_info in unreceiving_order.items %}
                                                <tr class="order-item">
                                                <td>
                                                    <label>
                                                        <a href="udai_order_detail.html" class="num">
                                                            {{ order.create_time | filter_time }} 订单号: 2669901385864042
                                                        </a>
                                                        {% for good,info in good_info.items %}

                                                        <div class="card">
                                                            <div class="img"><img src="{% static 'images/temp/item-img_1.jpg' %}" alt="" class="cover"></div>
                                                            <div class="name ep2">{{ good }}</div>
                                                            <div class="format">颜色分类：{{ info.goods_info_color }}  尺码：{{ info.goods_info_size }}</div>
                                                            <div class="favour">使用优惠券：优惠¥2.00</div>
                                                        </div>
                                                    </label>
                                                </td>
                                                <td>{{ info.goods_info_price}}</td>
                                                <td>{{ order.goods_number}}</td>
                                                <td>{{ order.payable_amount }}<br><span class="fz12 c6 text-nowrap">(含运费: ¥0.00)</span></td>
                                                <td class="state">
                                                    <a class="but c6">等待发货</a>
                                                    <a href="udai_order_detail.html" class="but c9">订单详情</a>
                                                </td>
                                                <td class="order">
                                                    <div class="del"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span></div>
                                                    <a href="{% url 'order_from:order_receipted' id=order.order_id %}" class="but but-primary">确认收货</a>
                                                    <a href="{% url 'order_from:order_apply_return' id=order.order_id%}" class="but c3">退款/退货</a>
                                                </td>

                                            </tr>
                                                           {% endfor %}
                                                    {% endfor %}
                                            {% endfor %}

                                            {% else %}
                                            <tr class="order-empty"><td colspan='6'>
											    <div class="empty-msg">最近没有任何订单，家里好像缺了点什么！<br><a href="item_category.html">要不瞧瞧去？</a></div>
										        </td>
                                            </tr>
                                        {% endif %}
                                        {% if unevaluate_orders %}
                                            {% for unevaluate_order in unevaluate_orders %}
                                                {% for order,good_info in unevaluate_order.items %}
                                                <tr class="order-item">
                                                <td>
                                                    <label>
                                                        <a href="udai_order_detail.html" class="num">
                                                            {{ order.create_time | filter_time }} 订单号: 2669901385864042
                                                        </a>
                                                        {% for good,info in good_info.items %}

                                                        <div class="card">
                                                            <div class="img"><img src="{% static 'images/temp/item-img_1.jpg' %}" alt="" class="cover"></div>
                                                            <div class="name ep2">{{ good }}</div>
                                                            <div class="format">颜色分类：{{ info.goods_info_color }}  尺码：{{ info.goods_info_size }}</div>
                                                            <div class="favour">使用优惠券：优惠¥2.00</div>
                                                        </div>
                                                    </label>
                                                </td>
                                                <td>{{ info.goods_info_price}}</td>
                                                <td>{{ order.goods_number}}</td>
                                                <td>{{ order.payable_amount }}<br><span class="fz12 c6 text-nowrap">(含运费: ¥0.00)</span></td>
                                                <td class="state">
                                                    <a class="but c6">等待发货</a>
                                                    <a href="udai_order_detail.html" class="but c9">订单详情</a>
                                                </td>
                                                <td class="order">
                                                    <div class="del"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span></div>
                                                    <a href="udai_order_receipted.html" class="but but-primary">确认评价</a>
                                                    <a href="{% url 'order_from:order_apply_return' id=order.order_id%}" class="but c3">退款/退货</a>
                                                </td>

                                            </tr>
                                                           {% endfor %}
                                                    {% endfor %}
                                            {% endfor %}

                                            {% else %}
                                            <tr class="order-empty"><td colspan='6'>
											    <div class="empty-msg">最近没有任何订单，家里好像缺了点什么！<br><a href="item_category.html">要不瞧瞧去？</a></div>
										        </td>
                                            </tr>
                                        {% endif %}
									</table>
{#                            {%endfor%}#}



                                    {# <--底部分页按钮显示--> #}
									<div class="page text-right clearfix" style="margin-top: 40px">
                                        <nav aria-label="Page navigation">
                                            <div class="pagination">
                                                <ul class="pagination">
                                                {% if page.has_previous %}  {# # 判断当前页是否有上一页 #}
										            <li><a href="/order_from/udai_order/{{page.previous_page_number}}" aria-label="Previous">
                                                    <span aria-hidden="true">&laquo;</span></a></li>
                                                {% endif %}
                                                {% for num in page.paginator.page_range%} {# # 循环遍历页码列表，并展示到底部 #}
                                                    {%if pindex == page.number%}
                                                        <li><a href="">{{ num }}</a></li>
                                                    {%else%}
                                                        <li><a href="/order_from/udai_order/{{num}}">{{ num }}</a></li>
                                                    {%endif%}
                                                {% endfor %}

                                                {% if page.has_next %} {# # 判断当前页是否有下一页 #}
                                                    <li><a href="/order_from/udai_order/{{page.next_page_number}}" aria-label="Next"><span aria-hidden="true">&raquo;</span></a></li>
                                                {% endif %}
                                                </ul>
                                            </div>
                                        </nav>
                                    </div>



                                                    <a class="disabled">上一页</a>
										<a class="select">1</a>
										<a href="">2</a>
										<a href="">3</a>
										<a class="" href="">下一页</a>

								    </div>

                            {# 待付款 #}
								<div role="tabpanel" class="tab-pane fade" id="pay">
									<table class="table text-center">
										<tr>
											<th width="380">商品信息</th>
											<th width="85">单价</th>
											<th width="85">数量</th>
											<th width="120">应付款</th>
											<th width="120">交易状态</th>
											<th width="120">交易操作</th>
										</tr>
                                        {% if unpaid_orders %}
                                            {% for unpaid_order in unpaid_orders %}
                                                {% for order,good_info in unpaid_order.items %}
                                                    <tr class="order-item">
                                                    <td>
                                                        <label>
                                                            <a href="udai_order_detail.html" class="num">
                                                                {{ order.create_time | filter_time }} 订单号: 2669901385864042
                                                            </a>
                                                            {% for name,info in good_info.items %}
                                                                <div class="card">
                                                                <div class="img"><img src="{% static 'images/temp/item-img_1.jpg' %}" alt="" class="cover"></div>
                                                                <div class="name ep2">{{ name }}</div>
                                                                <div class="format">颜色分类：{{ info.goods_info_color }}  尺码：{{ info.goods_info_size }}</div>
                                                                <div class="favour">使用优惠券：优惠¥2.00</div>
                                                            </div>
                                                        </label>
                                                    </td>
                                                    <td>￥{{ info.goods_info_price }}</td>
                                                    <td>{{ order.goods_number }}</td>
                                                    <td>￥{{ order.payable_amount }}<br><span class="fz12 c6 text-nowrap">(含运费: ¥0.00)</span></td>
                                                    <td class="state">
                                                        <a class="but c6">等待付款</a>
                                                        <a href="udai_mail_query.html" class="but cr">确认信息</a>
                                                        <a href="udai_order_detail.html" class="but c9">订单详情</a>
                                                    </td>
                                                    <td class="order">
                                                        <div class="del"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span></div>
                                                        <a href="{% url 'order_from:pay_page' id=order.order_id%}" class="but but-link">付款</a>
                                                        <a href="{% url 'order_from:delete_order' id=order.order_id%}" class="but c3">取消订单</a>
                                                    </td>
                                                </tr>
                                                                {% endfor %}
                                                    {% endfor %}
                                            {% endfor %}
                                        {% else %}
                                            <tr class="order-empty"><td colspan='6'>
											    <div class="empty-msg">最近没有任何订单，家里好像缺了点什么！<br><a href="item_category.html">要不瞧瞧去？</a></div>
										        </td>
                                            </tr>
                                        {% endif %}
									</table>
								</div>


                            {# 待发货 #}
								<div role="tabpanel" class="tab-pane fade" id="emit">
									<table class="table text-center">
										<tr>
											<th width="380">商品信息</th>
											<th width="85">单价</th>
											<th width="85">数量</th>
											<th width="120">实付款</th>
											<th width="120">交易状态</th>
											<th width="120">交易操作</th>
										</tr>

                                        {% if unshipment_orders %}
                                            {% for unshipment_order in unshipment_orders %}
                                                {% for order,good_info in unshipment_order.items %}
                                            <tr class="order-item">
                                                <td>
                                                    <label>
                                                        <a href="udai_order_detail.html" class="num">
                                                            {{ order.create_time | filter_time }} 订单号: 2669901385864042
                                                        </a>
                                                        {% for good,info in good_info.items %}

                                                        <div class="card">
                                                            <div class="img"><img src="{% static 'images/temp/item-img_1.jpg' %}" alt="" class="cover"></div>
                                                            <div class="name ep2">{{ good }}</div>
                                                            <div class="format">颜色分类：{{ info.goods_info_color }}  尺码：{{ info.goods_info_size }}</div>
                                                            <div class="favour">使用优惠券：优惠¥2.00</div>
                                                        </div>
                                                    </label>
                                                </td>
                                                <td>{{ info.goods_info_price}}</td>
                                                <td>{{ order.goods_number}}</td>
                                                <td>{{ order.payable_amout }}<br><span class="fz12 c6 text-nowrap">(含运费: ¥0.00)</span></td>
                                                <td class="state">
                                                    <a class="but c6">等待发货</a>
                                                    <a href="udai_order_detail.html" class="but c9">订单详情</a>
                                                </td>
                                                <td class="order">
                                                    <div class="del"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span></div>
                                                    <a href="" class="but but-primary">等待收货</a>    {# ################################# #}
                                                    <a href="{% url 'order_from:order_apply_return' id=order.order_id%}" class="but c3">退款/退货</a>
                                                </td>
                                            </tr>
                                                            {% endfor %}
                                                    {% endfor %}
                                            {% endfor %}
                                            {% else %}
                                            <tr class="order-empty"><td colspan='6'>
											    <div class="empty-msg">最近没有任何订单，家里好像缺了点什么！<br><a href="item_category.html">要不瞧瞧去？</a></div>
										        </td>
                                            </tr>
                                        {% endif %}




									</table>
									<div class="page text-right clearfix" style="margin-top: 40px">
										<a class="disabled">上一页</a>
										<a class="select">1</a>
										<a class="disabled">下一页</a>
									</div>
								</div>



								<div role="tabpanel" class="tab-pane fade" id="take">
                                {# 待收货 #}
									<table class="table text-center">
										<tr>
											<th width="380">商品信息</th>
											<th width="85">单价</th>
											<th width="85">数量</th>
											<th width="120">实付款</th>
											<th width="120">交易状态</th>
											<th width="120">交易操作</th>
										</tr>

                                        {% if unreceiving_orders %}
                                            {% for unreceiving_order in unreceiving_orders %}
                                                {% for order,good_info in unreceiving_order.items %}
                                                <tr class="order-item">
                                                <td>
                                                    <label>
                                                        <a href="udai_order_detail.html" class="num">
                                                            {{ order.create_time | filter_time }} 订单号: 2669901385864042
                                                        </a>
                                                        {% for good,info in good_info.items %}

                                                        <div class="card">
                                                            <div class="img"><img src="{% static 'images/temp/item-img_1.jpg' %}" alt="" class="cover"></div>
                                                            <div class="name ep2">{{ good }}</div>
                                                            <div class="format">颜色分类：{{ info.goods_info_color }}  尺码：{{ info.goods_info_size }}</div>
                                                            <div class="favour">使用优惠券：优惠¥2.00</div>
                                                        </div>
                                                    </label>
                                                </td>
                                                <td>{{ info.goods_info_price}}</td>
                                                <td>{{ order.goods_number}}</td>
                                                <td>{{ order.payable_amount }}<br><span class="fz12 c6 text-nowrap">(含运费: ¥0.00)</span></td>
                                                <td class="state">
                                                    <a class="but c6">等待发货</a>
                                                    <a href="udai_order_detail.html" class="but c9">订单详情</a>
                                                </td>
                                                <td class="order">
                                                    <div class="del"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span></div>
                                                    <a href="{% url 'order_from:order_receipted' id=order.order_id %}" class="but but-primary">确认收货</a>
                                                    <a href="{% url 'order_from:order_apply_return' id=order.order_id%}" class="but c3">退款/退货</a>
                                                </td>

                                            </tr>
                                                           {% endfor %}
                                                    {% endfor %}
                                            {% endfor %}

                                            {% else %}
                                            <tr class="order-empty"><td colspan='6'>
											    <div class="empty-msg">最近没有任何订单，家里好像缺了点什么！<br><a href="item_category.html">要不瞧瞧去？</a></div>
										        </td>
                                            </tr>
                                        {% endif %}

									</table>

								</div>


                                {# 待评价 #}
								<div role="tabpanel" class="tab-pane fade" id="eval">
									<table class="table text-center">
										<tr>
											<th width="380">商品信息</th>
											<th width="85">单价</th>
											<th width="85">数量</th>
											<th width="120">实付款</th>
											<th width="120">交易状态</th>
											<th width="120">交易操作</th>
										</tr>

                                        {% if unevaluate_orders %}
                                            {% for unevaluate_order in unevaluate_orders %}
                                                {% for order,good_info in unevaluate_order.items %}
                                                <tr class="order-item">
                                                <td>
                                                    <label>
                                                        <a href="udai_order_detail.html" class="num">
                                                            {{ order.create_time | filter_time }} 订单号: 2669901385864042
                                                        </a>
                                                        {% for good,info in good_info.items %}

                                                        <div class="card">
                                                            <div class="img"><img src="{% static 'images/temp/item-img_1.jpg' %}" alt="" class="cover"></div>
                                                            <div class="name ep2">{{ good }}</div>
                                                            <div class="format">颜色分类：{{ info.goods_info_color }}  尺码：{{ info.goods_info_size }}</div>
                                                            <div class="favour">使用优惠券：优惠¥2.00</div>
                                                        </div>
                                                    </label>
                                                </td>
                                                <td>{{ info.goods_info_price}}</td>
                                                <td>{{ order.goods_number}}</td>
                                                <td>{{ order.payable_amount }}<br><span class="fz12 c6 text-nowrap">(含运费: ¥0.00)</span></td>
                                                <td class="state">
                                                    <a class="but c6">等待发货</a>
                                                    <a href="udai_order_detail.html" class="but c9">订单详情</a>
                                                </td>
                                                <td class="order">
                                                    <div class="del"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span></div>
                                                    <a href="udai_order_receipted.html" class="but but-primary">确认评价</a>
                                                    <a href="{% url 'order_from:order_apply_return' id=order.order_id%}" class="but c3">退款/退货</a>
                                                </td>

                                            </tr>
                                                           {% endfor %}
                                                    {% endfor %}
                                            {% endfor %}

                                            {% else %}
                                            <tr class="order-empty"><td colspan='6'>
											    <div class="empty-msg">最近没有任何订单，家里好像缺了点什么！<br><a href="item_category.html">要不瞧瞧去？</a></div>
										        </td>
                                            </tr>
                                        {% endif %}

									</table>

									<div class="page text-right clearfix" style="margin-top: 40px">
										<a class="disabled">上一页</a>
										<a class="select">1</a>
										<a class="disabled">下一页</a>
									</div>
								</div>
							</div>
						</div>
					</div>
				
				</div>
			</div>
		</section>
	</div>
	<!-- 右侧菜单 -->
	<div class="right-nav">
		<ul class="r-with-gotop">
			<li class="r-toolbar-item">
				<a href="udai_welcome.html" class="r-item-hd">
					<i class="iconfont icon-user" data-badge="0"></i>
					<div class="r-tip__box"><span class="r-tip-text">用户中心</span></div>
				</a>
			</li>
			<li class="r-toolbar-item">
				<a href="udai_shopcart.html" class="r-item-hd">
					<i class="iconfont icon-cart"></i>
					<div class="r-tip__box"><span class="r-tip-text">购物车</span></div>
				</a>
			</li>
			<li class="r-toolbar-item">
				<a href="udai_collection.html" class="r-item-hd">
					<i class="iconfont icon-aixin"></i>
					<div class="r-tip__box"><span class="r-tip-text">我的收藏</span></div>
				</a>
			</li>
			<li class="r-toolbar-item">
				<a href="" class="r-item-hd">
					<i class="iconfont icon-liaotian"></i>
					<div class="r-tip__box"><span class="r-tip-text">联系客服</span></div>
				</a>
			</li>
			<li class="r-toolbar-item">
				<a href="issues.html" class="r-item-hd">
					<i class="iconfont icon-liuyan"></i>
					<div class="r-tip__box"><span class="r-tip-text">留言反馈</span></div>
				</a>
			</li>
			<li class="r-toolbar-item to-top">
				<i class="iconfont icon-top"></i>
				<div class="r-tip__box"><span class="r-tip-text">返回顶部</span></div>
			</li>
		</ul>
		<script>
			$(document).ready(function(){ $('.to-top').toTop({position:false}) });
		</script>
	</div>
{% endblock %}